<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<%=basePath%>">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.9.0.js"></script>
<script type="text/javascript">
	var webURL = '<%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path%>'; 
	$(function() {
		$.getJSON("user/app", function(data) {
			//alert(data);
			$.each(data, function(i, item) {
				/* var a = $("<a/>"); 
				a.attr("href", item.url)
				a.text(item.name);
				a.appendTo("#app");
				$('#app').append("<br/>"); */
				$("<a/>").attr("href", webURL + item.url + '?appId=' + item.id).text(item.name).appendTo("#app");
			});
		});
	});
</script>
</head>
<body>
  	<%@include file="userinfo.jsp" %>
  	<div id="app"></div>
</body>
</html>